package string;

public class SubstringDemo {
    public static void main(String[] args) {
                    //01234567890123456
        String str = "www.tedu.com";
        int start = 4;
        int end = 8;
        String name = str.substring(start, end);
        System.out.println(name);
        start = str.indexOf(".") + 1;
        end = str.indexOf(".",start);
        name = str.substring(start, end);
        System.out.println(name);
    }
}
